class Program
{
    static void Main(string[] args)
    {
        string str = "";
        int zm = 0, sz = 0, kg = 0, qt = 0;
        Console.WriteLine("输入一串字符：");
        str=Console.ReadLine();
        char[] c=str.ToCharArray();
        foreach(char i in c)
        {
            if (i >= 'a' && i <= 'z' || i >= 'A' && i <= 'Z')
                zm++;
            else if (i >= '0' && i <= '9')
                sz++;
            else if(i==' ')
                kg++;
            else
                qt++;
        }
        Console.WriteLine("字母有" + zm + "个,空格有" + kg + "个，数字有" + sz + "个，其他有" + qt + "个");
        Console.ReadLine();
    }
}